-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve support @constraint
annotation mapping to OpenAPI spec
#1541
Merged
ayeshLK
merged 32 commits into
ballerina-platform:constraint_support
from
SachinAkash01:constraint_support
Sep 20, 2023
Merged
Improve support @constraint
annotation mapping to OpenAPI spec
#1541
ayeshLK
merged 32 commits into
ballerina-platform:constraint_support
from
SachinAkash01:constraint_support
Sep 20, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Add support for mapping Ballerina constraints (Int, Float, Number) to the OpenAPI specification. * Add unit tests to ensure the accuracy & reliability of @constraint mapping to OpenAPI spec. * This ensures that Int, Float & Number constraints in Ballerina are accurately reflected in OpenAPI spec. Resolves: #4796 See also: #4788
* Add support for mapping Ballerina constraints (Int, Float, Number) to the OpenAPI specification. * Add unit tests to ensure the accuracy & reliability of @constraint mapping to OpenAPI spec. * This ensures that Int, Float & Number constraints in Ballerina are accurately reflected in OpenAPI spec. Resolves: #4796 See also: #4788
SachinAkash01
requested review from
hevayo,
NipunaRanasinghe and
lnash94
as code owners
September 16, 2023 20:07
ayeshLK
reviewed
Sep 17, 2023
...i-bal-service/src/main/java/io/ballerina/openapi/converter/service/ConstraintAnnotation.java
Outdated
Show resolved
Hide resolved
ayeshLK
reviewed
Sep 17, 2023
openapi-cli/src/test/resources/ballerina-to-openapi/constraint/decimalMax.bal
Show resolved
Hide resolved
ayeshLK
reviewed
Sep 17, 2023
openapi-cli/src/test/resources/ballerina-to-openapi/constraint/decimalMax.bal
Outdated
Show resolved
Hide resolved
ayeshLK
reviewed
Sep 17, 2023
openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/constraint/decimalMax.yaml
Outdated
Show resolved
Hide resolved
ayeshLK
reviewed
Sep 17, 2023
...bal-service/src/main/java/io/ballerina/openapi/converter/service/OpenAPIComponentMapper.java
Outdated
Show resolved
Hide resolved
…en/constraint/decimalMax.yaml Co-authored-by: Ayesh Almeida <[email protected]>
…APIComponentMapper.java
ayeshLK
reviewed
Sep 18, 2023
...bal-service/src/main/java/io/ballerina/openapi/converter/service/OpenAPIComponentMapper.java
Outdated
Show resolved
Hide resolved
…onstraintValuesToSchema()
…/openapi-tools into constraint_support # Conflicts: # openapi-bal-service/src/main/java/io/ballerina/openapi/converter/service/OpenAPIComponentMapper.java # openapi-cli/src/test/resources/ballerina-to-openapi/constraint/decimalMax.bal # openapi-cli/src/test/resources/ballerina-to-openapi/constraint/decimalMin.bal # openapi-cli/src/test/resources/ballerina-to-openapi/constraint/floatMax.bal # openapi-cli/src/test/resources/ballerina-to-openapi/constraint/floatMin.bal # openapi-cli/src/test/resources/ballerina-to-openapi/constraint/integerMax.bal # openapi-cli/src/test/resources/ballerina-to-openapi/constraint/integerMin.bal # openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/constraint/decimalMax.yaml # openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/constraint/decimalMin.yaml # openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/constraint/floatMax.yaml # openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/constraint/floatMin.yaml # openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/constraint/integerMax.yaml # openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/constraint/integerMin.yaml
…onstraintValuesToSchema()
TharmiganK
reviewed
Sep 18, 2023
openapi-cli/src/test/resources/ballerina-to-openapi/constraint/floatMax.bal
Outdated
Show resolved
Hide resolved
openapi-cli/src/test/resources/ballerina-to-openapi/constraint/floatMax.bal
Show resolved
Hide resolved
...bal-service/src/main/java/io/ballerina/openapi/converter/service/OpenAPIComponentMapper.java
Outdated
Show resolved
Hide resolved
Nuvindu
reviewed
Sep 18, 2023
...bal-service/src/main/java/io/ballerina/openapi/converter/service/OpenAPIComponentMapper.java
Show resolved
Hide resolved
dilanSachi
reviewed
Sep 18, 2023
...bal-service/src/main/java/io/ballerina/openapi/converter/service/OpenAPIComponentMapper.java
Outdated
Show resolved
Hide resolved
dilanSachi
reviewed
Sep 18, 2023
...bal-service/src/main/java/io/ballerina/openapi/converter/service/OpenAPIComponentMapper.java
Outdated
Show resolved
Hide resolved
Nuvindu
reviewed
Sep 18, 2023
...bal-service/src/main/java/io/ballerina/openapi/converter/service/OpenAPIComponentMapper.java
Outdated
Show resolved
Hide resolved
…er/service/OpenAPIComponentMapper.java Co-authored-by: Dilan Sachintha Nayanajith <[email protected]>
…/openapi-tools into constraint_support
lnash94
reviewed
Sep 18, 2023
...bal-service/src/main/java/io/ballerina/openapi/converter/service/OpenAPIComponentMapper.java
Show resolved
Hide resolved
openapi-cli/src/test/resources/ballerina-to-openapi/constraint/integerMin.bal
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## constraint_support #1541 +/- ##
=====================================================
Coverage ? 79.14%
Complexity ? 1788
=====================================================
Files ? 125
Lines ? 10136
Branches ? 1681
=====================================================
Hits ? 8022
Misses ? 1522
Partials ? 592 ☔ View full report in Codecov by Sentry. |
Closed
1 task
ayeshLK
merged commit Sep 20, 2023
53ca54f
into
ballerina-platform:constraint_support
5 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@constraint
mapping to OpenAPI spec.Resolves: #4796
See also: #4788